﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel; 
using System.Drawing;
using System.Data;
using CourseArraging.Common;
using Stone.DataContracts;
using Stone.Library.Common;

namespace CourseArraging.UControl
{
    public class UCCombo_right : UCCombo_base
    {
        // Fields
        private IContainer components = null; 

        // Methods
        public UCCombo_right()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UCCombo_right));
            this.SuspendLayout();
            // 
            // comboBox1
            // 
            this.comboBox1.DataSource = ((object)(resources.GetObject("comboBox1.DataSource")));
            this.comboBox1.DisplayMember = "TextField";
            this.comboBox1.ValueMember = "ValueField";
            // 
            // UCCombo_right
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.Name = "UCCombo_right";
            this.ResumeLayout(false);

        }

        protected override void setData()
        {
            DataTable list = this.basicProxy.GetList(null);
            if (list != null)
            {
                for (int i = 0; i < list.Rows.Count; i++)
                {
                    base.listItems.Add(new MyListItem(list.Rows[i][1].ToString(), list.Rows[i][0].ToString()));
                }
            }
        }
    }

 

}
